home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Modules / BackSpaceModules / Source / FlippyFloppy / FlippyFloppyView.h < prev    next >
Text File  |  1992-12-07  |  2KB  |  106 lines

  1. /*
  2.  
  3. FlippyFloppyView.h
  4.  
  5. Implements a wild and crazy text view.
  6.  
  7. Try and do this with X! Hah!
  8.  
  9.  Copyright (c) 1992 by Scott Byer
  10.  
  11.  Permission is given to freely distribute and modify this code
  12.  provided the copyright notice is left unchanged.
  13.  No warranties, explicit or implied, apply to this code.
  14.  
  15. */
  16.  
  17. #import <appkit/View.h>
  18. #import "Thinker.h"
  19.  
  20. // Constants
  21. #define TRUE 1
  22. #define FALSE 0
  23.  
  24. #define MAX_TEXT_LINES    5
  25.  
  26. typedef struct _t_TextBBox {
  27.     double    llx, lly, urx, ury;
  28.   } TextBBox, *PTextBBox;
  29.  
  30. typedef struct _t_TextStart {
  31.     double    x, y;
  32.   } TextStart, *PTextStart;
  33.  
  34. @interface FlippyFloppyView:View
  35.   {
  36.     /* Bounds of the screen. */
  37.     double    xmax, ymax;
  38.  
  39.     /* Overall control variable. */
  40.     double    hyperness;
  41.  
  42.     /* Old value of setcachelimit. */
  43.     int        cacheLimit;
  44.     
  45.     /* Speed variables. */
  46.     double    xspeed, yspeed, rotationspeed, xscalespeed, yscalespeed;
  47.     double    rspeed, gspeed, bspeed;
  48.  
  49.     /* Matrix variables */
  50.     double    x, y, rotation, xscale, yscale;
  51.     double    r, g, b;
  52.  
  53.     /* Text storage. */
  54.     char    *displayStrings[MAX_TEXT_LINES];
  55.     TextStart    startStrings[MAX_TEXT_LINES];
  56.     int        numLines;
  57.     TextBBox    stringsBBox;
  58.  
  59.     /* Tweak notification. */
  60.     BOOL    changed;
  61.     
  62.     /* Text font. */
  63.     id        textFont;
  64.     id        fontManager;
  65.     id        fontPanel;
  66.     
  67.     /* Inspector panel */
  68.     id        inspectorPanel;
  69.     id        hyperSlider;
  70.     id        hypernessField;
  71.     id        textPanel;
  72.     id        setFontButton;
  73.     id        fontNameDisplay;
  74.     id        flippyFloppyButton;
  75.   }
  76.  
  77. - initFrame:(NXRect *)frameRect;
  78. - initValues;
  79.  
  80. - inspector: sender;
  81. - inspectorInstalled;
  82. - inspectorWillBeRemoved;
  83.  
  84. - didLockFocus;
  85. - oneStep;
  86. - drawSelf:(const NXRect *)rects :(int)rectCount;
  87.  
  88. - sizeTo:(NXCoord)width :(NXCoord)height;
  89. - newSize;
  90.  
  91. - (BOOL)useBufferedWindow;
  92. - (const char *)windowTitle;
  93.  
  94. - setHyperness: sender;
  95. - setFlippyText: sender;
  96. - setFloppyFont: sender;
  97. - somethingChanged;
  98.  
  99. - changeFontFlippyFloppy: sender;
  100.  
  101. - add:someone ToResponderListOf: whichWindow;
  102. - remove:someone FromResponderListOf: whichWindow;
  103.  
  104. @end
  105.  
  106.